import request from '@/utils/request'

// 查询商品分类列表
export function listOrderEat(query) {
  return request({
    url: '/orderEat/orderEat/list',
    method: 'get',
    params: query
  })
}

// 查询商品分类详细
export function getOrderEat(categoryId) {
  return request({
    url: '/orderEat/orderEat/' + categoryId,
    method: 'get'
  })
}

// 查询商品分类下拉选
export function categoryList() {
  return request({
    url: '/orderEat/orderEat/categoryList',
    method: 'get',
  })
}

// 新增商品分类
export function addOrderEat(data) {
  return request({
    url: '/orderEat/orderEat',
    method: 'post',
    data: data
  })
}

// 修改商品分类
export function updateOrderEat(data) {
  return request({
    url: '/orderEat/orderEat',
    method: 'put',
    data: data
  })
}

// 删除商品分类
export function delOrderEat(categoryId) {
  return request({
    url: '/orderEat/orderEat/' + categoryId,
    method: 'delete'
  })
}

// 删除图片
export function delPicture(data) {
  return request({
    url: '/orderEat/orderEat/removePicture/' ,
    method: 'post',
    data: data
  })

}
